<input type="submit" value="modify" onclick="submit();"><br/>

<script src="http://cdn.bootcss.com/jquery/1.12.3/jquery.min.js"></script>
<script src="layer/layer.js"></script>
<script>
function submit(){
	var type = 'RMB';
	if(type === 'RMB'){
		//submit();
		//return true;
	}

	layer.confirm('您确定要修改用户USER的金额么？', {
		btn: ['确定','取消'] //按钮
	}, function(){
		layer.confirm('您确定要修改的用户是USER么？', {
			btn: ['确定','取消'] //按钮
		}, function(){
			layer.confirm('您确定要修改的币种是COIN么？', {
				btn: ['确定','取消'] //按钮
			}, function(){
				layer.confirm('您确定要修改的数量是NUM么？', {
					btn: ['确定','取消'] //按钮
				}, function(){
					layer.prompt({title: '请输入你要修改的用户USER，并确认', formType: 1}, function(user, index){
						layer.close(index);
						if(user === 'admin'){
							layer.prompt({title: '请输入你要修改的COIN，并确认', formType: 1}, function(coin, index){
								layer.close(index);
								if(coin === 'blc'){
									layer.prompt({title: '请输入你要修改的NUM，并确认', formType: 1}, function(num, index){
										layer.close(index);
										if(num === '666'){
											layer.msg('已发送修改请求', {icon: 1});
										} else {
											layer.msg('数量错误，已取消修改', {icon: 2});
										}
									});
								} else {
									layer.msg('币种错误，已取消修改', {icon: 2});
								}
							});
						} else {
							layer.msg('用户错误，已取消修改', {icon: 2});
						}
					});				
				}, function(){
					layer.msg('已取消修改', {icon: 2});
				});
			}, function(){
				layer.msg('已取消修改', {icon: 2});
			});
		}, function(){
			layer.msg('已取消修改', {icon: 2});
		});
	}, function(){
		layer.msg('已取消修改', {icon: 2});
	});
}


<!-- layer.msg('已发送修改请求', {icon: 1}); -->
//询问框
<!-- layer.confirm('您是如何看待前端开发？', { -->
  <!-- btn: ['重要','奇葩'] //按钮 -->
<!-- }, function(){ -->
  <!-- layer.msg('的确很重要', {icon: 1}); -->
<!-- }, function(){ -->
  <!-- layer.msg('也可以这样', { -->
    <!-- time: 20000, //20s后自动关闭 -->
    <!-- btn: ['明白了', '知道了'] -->
  <!-- }); -->
<!-- }); -->

//prompt层
<!-- layer.prompt({title: '输入任何口令，并确认', formType: 1}, function(pass, index){ -->
  <!-- layer.close(index); -->
  <!-- layer.prompt({title: '随便写点啥，并确认', formType: 2}, function(text, index){ -->
    <!-- layer.close(index); -->
    <!-- layer.msg('演示完毕！您的口令：'+ pass +'<br>您最后写下了：'+text); -->
  <!-- }); -->
<!-- }); -->
</script>